// 商品列表的组件
<template>
  <div class="goods-List">
    <goodItem v-for="(item,index) in goodsList" :key="index" :item="item"></goodItem>
  </div>
</template>
<script>
import goodItem from "./ItemGood";
export default {
  data() {
    return {};
  },
  method() {},
  components: {
    goodItem
  },
  props: {
    // 接受的商品数据对象
    goodsList: {
      type: Array,
      default() {
        return [];
      }
    }
  }
};
</script>
<style lang="scss" scoped>
.goods-List {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  padding: 0 4px;
}
</style>